home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
ad2mac.arc
/
TEST11.LST
< prev
next >
Wrap
File List
|
1989-08-04
|
9KB
|
193 lines
Fri Aug 4 1989 10:17 Page 1
HC11 Test Program for AD2MAC
2500 A.D. 68c11 Macro Assembler - Version 4.03a
-------------------------------------------------
Input Filename : test11.asm
Output Filename : test11.obj
1 ttl HC11 Test Program for AD2MAC
2 * Test Program for AD2MAC Utility
3 * Extracts symbol info from 2500AD cross 68HC11 assembler
4 * listing file (.LST) and produces HDS-300 compatible
5 * macro file (.MAC) containing local symbol (LS) commands.
6 *
7 * BY: Peter S. Gilmour 27 July 1989
8
9 0103 control equ $103
10 0080 srmask equ $80
11 0204 fcbase equ $204
12 0040 stmask equ $40
13 00AA pattern equ $aa
14 0200 shram equ $200
15 0307 jmp1 equ $307
16 0323 jmp1_addr equ jmp1+$1c
17
18 0000 .absolute
19 0050 org $50
20 0050 count rmb 1 Command count
21 0051 .relative
22 0200 org shram
23 0200 rmb $20
24 0220 addr rmb 2 Command address
25 0222 get rmb 2 Get data address
26 0224 data rmb 80 Command data
27 0274 rmb 100
28 02D7 stack equ *-1 Stack area
29 page
Fri Aug 4 1989 10:17 Page 2
HC11 Test Program for AD2MAC
30
31 0800 org $800
32
33 * Here for power up/reset:
34 0800 B6 01 03 start ldaa control
35 0803 84 40 anda #stmask If not power up, then
36 0805 27 1A beq config . enter exec via config cmd!
37
38 * Here for self-test:
39 0807 C6 00 stest ldab #0
40 0809 86 AA ldaa #pattern
41 080B CE 02 00 ldx #shram
42 080E A7 00 st_100 staa ,x Test 1st page of shared ram.
43 0810 A1 00 cmpa ,x
44 0812 26 08 bne st_err1 Exit if error!
45 0814 43 coma Get inverse pattern
46 0815 2A F7 bpl st_100 and test same location again!
47 0817 5C incb
48 0818 27 F4 beq st_100 Continue until entire page is tested!
49
50 081A 20 0C bra exec Enter executive loop.
51
52 * Here for self-test error:
53 081C CC 02 00 st_err1 ldd #shram
54 081F 20 FE bra * Hang the system.
55 page
Fri Aug 4 1989 10:17 Page 3
HC11 Test Program for AD2MAC
56
57 * Here for config command:
58 0821 B6 01 03 config ldaa control
59 0824 B7 02 00 staa shram
60 0827 01 nop
61 * Fall into the exec loop!
62
63 * Here for the executive command loop:
64 0828 8E 02 D7 exec lds #stack Reset stack pointer.
65 082B B6 01 03 ldaa control
66 082E 8A 80 oraa #srmask
67 0830 B7 01 03 staa control Yield shared ram to FIM.
68
69 0833 B6 01 03 ex$wait ldaa control
70 0836 84 80 anda #srmask
71 0838 26 F9 bne ex$wait Wait for FIM to return shared ram.
72
73 083A B6 02 04 ldaa fcbase Get cmd word and verify it, else
74 083D 26 E9 bne exec . ignore it!
75 083F F6 02 05 ldab fcbase+1
76 0842 81 02 cmp #maxfc+1
77 0844 24 E2 bhs exec
78
79 0846 58 lslb Get addr of proper routine from table
80 0847 CE 08 4F ldx #ftabl and place into X register.
81 084A 3A abx
82
83 084B AD 00 jsr ,x Go execute the command.
84 084D 20 D9 bra exec Return to exec loop.
85
86 084F 0853 ftabl fdb rduser
87 0851 0862 fdb wruser
88 0001 maxfc equ ((*-ftabl)/2)-1 Maximum legal function code
89 page
Fri Aug 4 1989 10:17 Page 4
HC11 Test Program for AD2MAC
90
91 * Here for read user memory command:
92 0853 BD 08 71 rduser jsr cmd.init
93
94 0856 A6 00 rduser1 ldaa 0,x
95 0858 B7 02 24 staa data
96 085B 08 inx
97 085C 7C 00 50 inc count
98 085F 26 F5 bne rduser1
99
100 0861 39 rts
101
102 * Here for write user memory command:
103 0862 BD 08 71 wruser jsr cmd.init
104
105 0865 B6 02 24 wruser1 ldaa data
106 0868 A7 00 staa ,x
107 086A 08 inx
108 086B 7C 00 50 inc count
109 086E 26 F5 bne wruser1
110
111 0870 39 rts
112
113 * Subr. to init for command execution:
114 0871 B6 02 20 cmd.init ldaa addr
115 0874 B7 02 22 staa get
116 0877 B6 02 21 ldaa addr+1
117 087A B7 02 23 staa get+1
118 087D 39 rts
119
120 087E end
Fri Aug 4 1989 10:17 Page 5
Defined Symbol Name Value References
24 addr 0220 114 116
114 cmd.init 0871 92 103
Pre CODE 0050 19 22 31
58 config 0821 36
9 control = 0103 34 58 65 67 69
20 count 0050 97 108
Pre DATA 0000
26 data 0224 95 105
69 ex$wait 0833 71
64 exec 0828 50 74 77 84
11 fcbase = 0204 73 75
86 ftabl 084F 80 88
25 get 0222 115 117
15 jmp1 = 0307 16
16 jmp1_addr = 0323
88 maxfc = 0001 76
Pre PAGE0 0000
13 pattern = 00AA 40
92 rduser 0853 86
94 rduser1 0856 98
14 shram = 0200 22 41 53 59
10 srmask = 0080 66 70
28 stack = 02D7 64
34 start 0800
39 stest 0807
12 stmask = 0040 35
42 st_100 080E 46 48
53 st_err1 081C 44
103 wruser 0862 87
105 wruser1 0865 109
Lines Assembled : 120 Assembly Errors : 0